package com.androidcourse.service.impl;

import com.androidcourse.bean.User;
import com.androidcourse.mapper.UserMapper;
import com.androidcourse.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {


   @Autowired
    UserMapper userMapper;

    @Override
    public List<User> getUserList() {
        List<User> userList = userMapper.getUserList();
        return userList;
    }

    @Override
    public List<User> getUserListXml() {
        List<User> userListXml = userMapper.getUserListXml();
        return userListXml;
    }

    @Override
    public User userLogin(User loginUser) {
        User user = userMapper.loginUser(loginUser);

        return user;
    }

    @Override
    public int userRegister(User registerUser) {
        int i = userMapper.userRegister(registerUser);
        return i;
    }


}
